package cn.wolfcode.domain;

import com.alibaba.fastjson.JSON;
import lombok.*;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.HashMap;

@Setter
@Getter
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class Classinfo {
    private Long id;

    private String name;

    private Integer number;

    private Employee employee;

    public String getJson(){
        HashMap<String, Object> map = new HashMap<>();
        map.put("id",this.id);
        map.put("name",this.name);
        map.put("number",this.number);
        map.put("employeeId",this.employee.getId());
        return JSON.toJSONString(map);

    }


}